package com.hongshan.wallet.core.wallet

import android.arch.lifecycle.ViewModelProviders
import android.databinding.ViewDataBinding
import android.os.Bundle
import android.support.v7.widget.GridLayoutManager
import com.alibaba.android.arouter.facade.annotation.Route
import com.hongshan.wallet.BR
import com.hongshan.wallet.R
import com.hongshan.wallet.base.MyActivity
import com.hongshan.wallet.router.RouterIndex
import kotlinx.android.synthetic.main.activity_account_manage.*
import kotlinx.android.synthetic.main.appbar.*

/**
 * Copyright Zhangxx.
 * Copyright (c) 2019
 * All rights reserved
 *
 * @project  : Wallet
 * @package  : com.example.wallet.core.wallet
 * @author   : zhangxx
 * @date     : 2019/3/26
 * @email    : qq957413212@hotmail.com
 * @desc     : //TUDO
 */
@Route(path = RouterIndex.ACCOUNT_MANAGE)
class AccountManageActivity:MyActivity<ViewDataBinding,AccountManageViewModel>() {

    override fun initVariableId() = BR.vm

    override fun initContentView(savedInstanceState: Bundle?) = R.layout.activity_account_manage

    override fun initViewModel() = ViewModelProviders.of(this)[AccountManageViewModel::class.java]

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        tvTitle.text = "账户管理"
        rvAccount.layoutManager = GridLayoutManager(this,2)
    }

    override fun onStart() {
        super.onStart()
        viewModel.getBankCardList()
    }
}